import Toast from 'react-bootstrap/Toast';

export default (props) => (
  <div>
    <Toast
      style={{
        position: 'relative',
        top: '50%',
        left: '50%',
        transform: 'translate(-50%)',
      }}
      onClose={props.close}
      show={props.show}
      delay={3000}
      autohide
    >
      <Toast.Header><strong className="mr-auto">{props.title}</strong></Toast.Header>
      <Toast.Body>{props.text}</Toast.Body>
    </Toast>
  </div>
);
